
/*
 * Copyright 2002-2018 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 *版权所有2002-2018原作者。
 *
 *根据Apache许可证2.0版（“许可证”）获得许可；
 *除非符合许可证，否则不得使用此文件。
 *您可以在以下地址获取许可证副本：
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 *除非适用法律要求或书面同意，软件
 *根据许可证分发的内容是按“原样”分发的，
 *无任何明示或暗示的保证或条件。
 *有关管理权限和
 *许可证下的限制。
 */

package org.springframework.aop.aspectj;

import org.springframework.core.Ordered;

/**
 * Interface to be implemented by types that can supply the information
 * needed to sort advice/advisors by AspectJ's precedence rules.
 *
 * @author Adrian Colyer
 * @since 2.0
 * @see org.springframework.aop.aspectj.autoproxy.AspectJPrecedenceComparator
 */
/**
 *接口由可提供信息的类型实现
 *需要根据AspectJ的优先级规则对建议/顾问进行排序。
 *
 *@作者Adrian Colyer
 *@自2.0起
 *@请参见org.springframework.aop.aectj.autoproxy.AspectJPretenceComparator
 */
public interface AspectJPrecedenceInformation extends Ordered {

	// Implementation note:
	// 实施说明：
	// We need the level of indirection this interface provides as otherwise the
	// 我们需要此接口提供的间接寻址级别，否则
	// AspectJPrecedenceComparator must ask an Advisor for its Advice in all cases
	// AspectJPretenceComparator在任何情况下都必须向顾问寻求建议
	// in order to sort advisors. This causes problems with the
	// 以便对顾问进行排序。这会导致
	// InstantiationModelAwarePointcutAdvisor which needs to delay creating
	// 需要延迟创建的InstantiationModelAwarePointcutAdvisor
	// its advice for aspects with non-singleton instantiation models.
	// 它对非单例实例化模型方面的建议。

	/**
	 * Return the name of the aspect (bean) in which the advice was declared.
	 */
	/**
	 *返回声明建议的方面（bean）的名称。
	 */
	String getAspectName();

	/**
	 * Return the declaration order of the advice member within the aspect.
	 */
	/**
	 *返回方面中建议成员的声明顺序。
	 */
	int getDeclarationOrder();

	/**
	 * Return whether this is a before advice.
	 */
	/**
	 *返回这是否是之前的建议。
	 */
	boolean isBeforeAdvice();

	/**
	 * Return whether this is an after advice.
	 */
	/**
	 *返回这是否为后续建议。
	 */
	boolean isAfterAdvice();

}
